public class User
{
    private final String username;
    private final String password;
    private final String email;

    // 构造方法
    public User(String username, String password, String email)
    {
        this.username = username;
        this.password = password;
        this.email = email;
    }

    // 用户信息展示
    public void displayInfo()
    {
        System.out.println("账号：" + username + ", 密码：" + password + ", 邮箱：" + (email != null ? email : "未填写"));
    }

    // 主方法，用于创建User对象并展示信息
    public static void main(String[] args)
    {
        User user1 = new User("user1", "password1", "email1@example.com");
        User user2 = new User("user2", "password2", null);

        user1.displayInfo();
        user2.displayInfo();
    }
}